package com.itheima.d2_byte_stream;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

/*
     目标：掌握文件字节输出流FileOutputStream的使用。
 */
public class FileOutputStreamTest4 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fis = new FileOutputStream("hhh.txt",true);
        /*fis.write(97);
        byte[] bytes = {97,98,99,100};
        fis.write(bytes);
        fis.write(bytes,1,2);*/
        for (int i = 0; i < 10; i++) {
            fis.write("iuhfhfehwfuhf".getBytes());

//            fis.write("\r\n".getBytes());
            fis.write(System.lineSeparator().getBytes());
        }

        fis.close();



    }
}
